home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat7 / tcp.z / tcp
Encoding:
Text File  |  2002-10-03  |  6.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTCCCCPPPP((((7777PPPP))))                                                                TTTTCCCCPPPP((((7777PPPP))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      tcp - Internet Transmission Control Protocol
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssoooocccckkkkeeeetttt....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<nnnneeeettttiiiinnnneeeetttt////iiiinnnn....hhhh>>>>
  14.  
  15.      ssss ==== ssssoooocccckkkkeeeetttt((((AAAAFFFF____IIIINNNNEEEETTTT,,,, SSSSOOOOCCCCKKKK____SSSSTTTTRRRREEEEAAAAMMMM,,,, 0000))));;;;
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      The TCP protocol provides reliable, flow-controlled, two-way transmission
  19.      of data.  It is a byte-stream protocol used to support the SOCK_STREAM
  20.      abstraction.  TCP uses the standard Internet address format and, in
  21.      addition, provides a per-host collection of "port addresses".  Thus, each
  22.      address is composed of an Internet address specifying the host and
  23.      network, with a specific TCP port on the host identifying the peer
  24.      entity.
  25.  
  26.      Sockets utilizing the tcp protocol are either "active" or "passive".
  27.      Active sockets initiate connections to passive sockets.  By default TCP
  28.      sockets are created active; to create a passive socket the _l_i_s_t_e_n(2)
  29.      system call must be used after binding the socket with the _b_i_n_d(2) system
  30.      call.  Only passive sockets may use the _a_c_c_e_p_t(2) call to accept incoming
  31.      connections.  Only active sockets may use the _c_o_n_n_e_c_t(2) call to initiate
  32.      connections.
  33.  
  34.      Passive sockets may "underspecify" their location to match incoming
  35.      connection requests from multiple networks.  This technique, termed
  36.      "wildcard addressing", allows a single server to provide service to
  37.      clients on multiple networks.  To create a socket which listens on all
  38.      networks, the Internet address INADDR_ANY must be bound.  The TCP port
  39.      may still be specified at this time; if the port is left unspecified by
  40.      setting it to 0, the system will assign one.  Once a connection has been
  41.      established the socket's address is fixed by the peer entity's location.
  42.      The address assigned the socket is the address associated with the
  43.      network interface through which packets are being transmitted and
  44.      received.  Normally this address corresponds to the peer entity's
  45.      network.
  46.  
  47.      TCP supports two socket options which can be tested with _g_e_t_s_o_c_k_o_p_t(2),
  48.      and manipulated with _s_e_t_s_o_c_k_o_p_t(2).  These options are defined in
  49.      <_n_e_t_i_n_e_t/_t_c_p._h>.
  50.  
  51.      TCP_NODELAY
  52.           Under most circumstances, TCP sends data when it is presented; when
  53.           outstanding data has not yet been acknowledged, it gathers small
  54.           amounts of output to be sent in a single packet once an
  55.           acknowledgement is received.  For a small number of clients, such as
  56.           window systems that send a stream of mouse events which receive no
  57.           replies, this packetization may cause significant delays.
  58.           Therefore, TCP provides a boolean option, TCP_NODELAY, to defeat
  59.           this algorithm.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTCCCCPPPP((((7777PPPP))))                                                                TTTTCCCCPPPP((((7777PPPP))))
  71.  
  72.  
  73.  
  74.      TCP_FASTACK
  75.           For certain applications, TCP's default behavior of delaying
  76.           acknowledgements may produce poor performance.  Therefore, it is
  77.           possible to turn delayed acknowledgements off using the TCP_FASTACK
  78.           option.  Use of this option is not generally recommended, as it will
  79.           cause more traffic than is normally desirable.
  80.  
  81.      _N._B. Starting with IRIX 6.5, both TCP_NODELAY and TCP_FASTACK are
  82.      inherited across an _a_c_c_e_p_t(2) system call.  In previous IRIX releases
  83.      this was not the case.
  84.  
  85.      Options at the IP transport level may be used with TCP; see _i_p(7P).
  86.      Incoming connection requests that are source-routed are noted, and the
  87.      reverse source route is used in responding. The source route may be
  88.      disabled by specifying a zero-length buffer with the IP_OPTIONS option to
  89.      _s_e_t_s_o_c_k_o_p_t (see _i_p(7P)).
  90.  
  91. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  92.      A socket operation may fail with one of the following errors returned:
  93.  
  94.      [EISCONN]           when trying to establish a connection on a socket
  95.                          which already has one;
  96.  
  97.      [ENOBUFS]           when the system runs out of memory for an internal
  98.                          data structure;
  99.  
  100.      [ETIMEDOUT]         when a connection was dropped due to excessive
  101.                          retransmissions;
  102.  
  103.      [ECONNRESET]        when the remote peer forces the connection to be
  104.                          closed;
  105.  
  106.      [ECONNREFUSED]      when the remote peer actively refuses connection
  107.                          establishment (usually because no process is
  108.                          listening to the port);
  109.  
  110.      [EADDRINUSE]        when an attempt is made to create a socket with a
  111.                          port which has already been allocated;
  112.  
  113.      [EADDRNOTAVAIL]     when an attempt is made to create a socket with a
  114.                          network address for which no network interface
  115.                          exists.
  116.  
  117. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  118.      getsockopt(2), socket(2), intro(3), inet(7F), ip(7P)
  119.      _I_R_I_X _N_e_t_w_o_r_k _P_r_o_g_r_a_m_m_i_n_g _G_u_i_d_e
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.